
var thresholdType = {
    0: "Overall",
    1: "Environment",
    2: "Social",
    3: "Governance"
}

var collection = db.getSiblingDB("ClientDW_A").EsgFocusThresholds
collection.find({Type: { $type: 16 }}).forEach(function(item){
    item.Type = thresholdType[item.Type];
    collection.save(item);
})

var collection = db.getSiblingDB("ClientDW_B").EsgFocusThresholds
collection.find({Type: { $type: 16 }}).forEach(function(item){
    item.Type = thresholdType[item.Type];
    collection.save(item);
})

